package ihm;

import javax.swing.JFrame;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.JTextField;
import javax.swing.LayoutStyle.ComponentPlacement;
import javax.swing.JButton;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

public class FrmModifierCollaborateur extends JFrame{
	private JTextField txtMatriculeModif;
	private JTextField txtNomModif;
	private JTextField txtPrenomModif;

	private FrmModifierCollaborateur(){
		
		JLabel lblMatricule = new JLabel("Matricule :");
		
		JLabel lblNom = new JLabel("Nom :");
		
		JLabel lblPrnom = new JLabel("Prénom :");
		
		JLabel lblModifierCollaborateur = new JLabel("Modifier Collaborateur");
		lblModifierCollaborateur.setFont(new Font("Tahoma", Font.PLAIN, 14));
		
		txtMatriculeModif = new JTextField();
		txtMatriculeModif.setColumns(10);
		
		txtNomModif = new JTextField();
		txtNomModif.setColumns(10);
		
		txtPrenomModif = new JTextField();
		txtPrenomModif.setColumns(10);
		
		JButton btnModifier = new JButton("Modifier");
		
		JButton btnAnnulerModif = new JButton("Annuler");
		btnAnnulerModif.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent arg0) {
				dispose();
			}
		});
		GroupLayout groupLayout = new GroupLayout(getContentPane());
		groupLayout.setHorizontalGroup(
			groupLayout.createParallelGroup(Alignment.LEADING)
				.addGroup(groupLayout.createSequentialGroup()
					.addContainerGap()
					.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
						.addGroup(groupLayout.createSequentialGroup()
							.addComponent(lblPrnom)
							.addPreferredGap(ComponentPlacement.UNRELATED)
							.addComponent(txtPrenomModif, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
						.addComponent(lblModifierCollaborateur)
						.addGroup(groupLayout.createSequentialGroup()
							.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
								.addComponent(lblMatricule)
								.addComponent(lblNom))
							.addPreferredGap(ComponentPlacement.RELATED)
							.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
								.addComponent(txtNomModif, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
								.addComponent(txtMatriculeModif, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))
						.addGroup(groupLayout.createSequentialGroup()
							.addComponent(btnModifier)
							.addPreferredGap(ComponentPlacement.RELATED, 79, Short.MAX_VALUE)
							.addComponent(btnAnnulerModif)))
					.addContainerGap())
		);
		groupLayout.setVerticalGroup(
			groupLayout.createParallelGroup(Alignment.LEADING)
				.addGroup(groupLayout.createSequentialGroup()
					.addContainerGap()
					.addComponent(lblModifierCollaborateur)
					.addGap(34)
					.addGroup(groupLayout.createParallelGroup(Alignment.TRAILING)
						.addComponent(lblMatricule)
						.addComponent(txtMatriculeModif, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
					.addGap(18)
					.addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)
						.addComponent(lblNom)
						.addComponent(txtNomModif, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
					.addGap(18)
					.addGroup(groupLayout.createParallelGroup(Alignment.TRAILING)
						.addComponent(lblPrnom)
						.addComponent(txtPrenomModif, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
					.addPreferredGap(ComponentPlacement.RELATED, 35, Short.MAX_VALUE)
					.addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)
						.addComponent(btnModifier)
						.addComponent(btnAnnulerModif))
					.addContainerGap())
		);
		getContentPane().setLayout(groupLayout);
		

	}

}
